// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL     : http://192.168.201.145:92/SelfHelpCash/SelfService_dll.dll/wsdl/Iselfservice
// Version  : 1.0
// (2014-07-12 10:39:27 - - $Rev: 45757 $)
// ************************************************************************ //

unit Iselfservice11;

interface

uses InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns;

type

  // ************************************************************************ //
  // The following types, referred to in the WSDL document are not being represented
  // in this file. They are either aliases[@] of other types represented or were referred
  // to but never[!] declared in the document. The types from the latter category
  // typically map to predefined/known XML or Embarcadero types; however, they could also 
  // indicate incorrect WSDL documents that failed to declare or import a schema type.
  // ************************************************************************ //
  // !:string          - "http://www.w3.org/2001/XMLSchema"[]


  // ************************************************************************ //
  // Namespace : urn:selfserviceIntf-Iselfservice
  // soapAction: urn:selfserviceIntf-Iselfservice#%operationName%
  // transport : http://schemas.xmlsoap.org/soap/http
  // style     : rpc
  // use       : encoded
  // binding   : Iselfservicebinding
  // service   : Iselfserviceservice
  // port      : IselfservicePort
  // URL       : http://192.168.201.145:92/SelfHelpCash/SelfService_dll.dll/soap/Iselfservice
  // ************************************************************************ //
  Iselfservice = interface(IInvokable)
  ['{C29DEAC8-D070-0550-5506-B53DC734C625}']
    function  GetPatChargeType(const request: string): string; stdcall;
    function  GdaGetOutPay(const request: string): string; stdcall;
    function  GdaInsertOutPay(const request: string): string; stdcall;
    function  GetPatSIState(const request: string): string; stdcall;
  end;

function GetIselfservice(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): Iselfservice;


implementation
  uses SysUtils;

function GetIselfservice(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): Iselfservice;
const
  defWSDL = 'http://192.168.201.145:92/SelfHelpCash/SelfService_dll.dll/wsdl/Iselfservice';
  defURL  = 'http://192.168.201.145:92/SelfHelpCash/SelfService_dll.dll/soap/Iselfservice';
  defSvc  = 'Iselfserviceservice';
  defPrt  = 'IselfservicePort';
var
  RIO: THTTPRIO;
begin
  Result := nil;
  if (Addr = '') then
  begin
    if UseWSDL then
      Addr := defWSDL
    else
      Addr := defURL;
  end;
  if HTTPRIO = nil then
    RIO := THTTPRIO.Create(nil)
  else
    RIO := HTTPRIO;
  try
    Result := (RIO as Iselfservice);
    if UseWSDL then
    begin
      RIO.WSDLLocation := Addr;
      RIO.Service := defSvc;
      RIO.Port := defPrt;
    end else
      RIO.URL := Addr;
  finally
    if (Result = nil) and (HTTPRIO = nil) then
      RIO.Free;
  end;
end;


initialization
  { Iselfservice }
  InvRegistry.RegisterInterface(TypeInfo(Iselfservice), 'urn:selfserviceIntf-Iselfservice', '');
  InvRegistry.RegisterDefaultSOAPAction(TypeInfo(Iselfservice), 'urn:selfserviceIntf-Iselfservice#%operationName%');

end.